#ifndef __RED_FLOAT_OBJECT_H__
#define __RED_FLOAT_OBJECT_H__

#include <stdint.h>
#include "redobject.h"

typedef struct _RedFloatObject
{
	RedObject_HEAD

	double fl_value;
} RedFloatObject;

RED_EXPORT extern RedTypeObject RedType_Float;

#define RedFloat_Exact(o)		((o)->ob_type == &RedType_Float)
#define RedFloat_Value(o)		(((RedFloatObject *)(o))->fl_value)

RED_EXPORT RedObject *RedFloat_FromInt(int64_t value);
RED_EXPORT RedObject *RedFloat_FromFloat(double value);

RED_EXPORT RedObject *RedFloat_FromBool(RedObject *value);
RED_EXPORT RedObject *RedFloat_FromString(RedObject *value);
RED_EXPORT RedObject *RedFloat_FromCString(const char *value);

#endif /* __RED_FLOAT_OBJECT_H__ */
